package com.fenqiyong.www;

import android.content.Intent;

import com.orhanobut.logger.Logger;
import com.fenqiyong.www.action.SplashActContract;
import com.fenqiyong.www.action.SplashActPresent;


import javax.inject.Inject;

import ren.nearby.http.base.BaseActivity;


/**
 * 欢迎页
 * Created by Administrator on 2018/5/18 0018.
 */

public class SplashAct extends BaseActivity implements SplashActContract.View {

    @Inject
    SplashActContract.Action action;

    @Override
    protected void onDestroy() {
        super.onDestroy();


    }

    @Override
    public void onIntent() {
        super.onIntent();
        action.takeView(this);
    }

    @Override
    public void setPresenter(SplashActPresent presenter) {

    }


    @Override
    public void initView() {
        super.initView();
        builder
                .setStatusBarTintResource(R.color.splash_2color)
                .build();
        action.channel("");


    }

    @Override
    public void BUi(String url) {
        Logger.e("B 进入");
//        Intent intent = new Intent(this, B14KAdvertAct.class);
//        intent.putExtra("url","");
//        startActivity(intent);
    }

    @Override
    public void AorB(int mode_switch) {
        switch (mode_switch) {
            case 0:
                Logger.e("this a ");
                startActivity(new Intent(this, ALoginAct.class));
                break;
            case 1:
                Logger.e("this b ");
//                action.event();
//                startActivity(new Intent(this, B14KAct.class));
//                Intent intent = new Intent(this, B14KAdvertAct.class);
//                intent.putExtra("url_img", "");
//                intent.putExtra("url", "");
//                startActivity(intent);
                break;
        }

    }
}
